<template>
  <article class="excerpt excerpt-1 excerpt-text">
    <header>
      <router-link class="cat" :to="{ name: 'Category', params: { categoryId: post.category.id }}">
        {{ post.category.name }}
      </router-link>
      <h2>
        <router-link :title="post.title" :to="{ name: 'Post', params: { postId: post.id }}">
          {{ post.title }}
          <!--<span>副标题显示文字</span>-->
        </router-link>
      </h2>
    </header>
    <p class="meta">
      <time><i class="fa fa-clock-o"></i>{{ post.createAt }}</time>
      <span class="author"><i class="fa fa-user"></i>{{ post.author.nickName }}</span>
      <span class="pv"><i class="fa fa-eye"></i>阅读({{ post.views }})</span>
      <span class="vote"><i class="fa fa-thumbs-o-up"></i>赞({{ post.upVote }})</span>
      <span class="vote"><i class="fa fa-thumbs-o-down"></i>踩({{ post.upVote }})</span>
    </p>
    <p class="note">
      {{ post.summary }}
    </p>
  </article>
</template>

<script>

  export default {
    props: ['post'],
    name: "ListItem",
  }
</script>

<style scoped>

</style>
